package com.CodingInn.code.pojo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

//@Component
public class Cat {
	private String catName = "tomcat";

	public Cat() {
		System.out.println("Cat被创建了");
	}

	public String getCatName() {
		return catName;
	}

	@Value("${JAVA_HOME}")
	public void setCatName(String catName) {//自动赋值功能
		System.out.println("cat的setName正在调用");
		this.catName = catName;
	}


}
